<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%-- @author: Christian Baumhof --%>

<%-- Title --%>
<h1>
	<s:text name="title.editOralExam" />
</h1>

<%-- Student information --%>
<h2>
	<s:property value="result.student.lastName" />
	,
	<s:property value="result.student.firstName" />
</h2>

<%-- Maniple and subject information --%>
<table class="formTable">
	<tr>
		<td><s:text name="lbl.maniple" /></td>
		<td><s:property value="result.student.maniple.name" /></td>
	</tr>
	<tr>
		<td><s:text name="lbl.subject" />:</td>
		<td><s:property
				value="result.examination.examinationSubject.title" /> - <s:property
				value="result.examination.examinationSubject.description" /></td>
	</tr>
</table>

<%-- Data table --%>
<s:form>
	<s:hidden name="id" />
	<table>
		<tr>
			<th><s:text name="lbl.oralGrade" /></th>
			<th><s:text name="lbl.examDate" /></th>
			<th><s:text name="lbl.typist" /></th>
		</tr>
		<s:if test="openExam">
			<td><s:textfield theme="simple" disabled="true" /></td>
			<td><s:textfield theme="simple" disabled="true" /></td>
			<td><s:textfield theme="simple" disabled="true" /></td>
		</s:if>
		<s:else>
			<td><s:hidden name="oralExaminationResult.id" /> <s:hidden
					name="oralExaminationResult.valid" /> <s:hidden
					name="oralExaminationResult.entryDate" /> <s:select list="grades"
					name="oralExaminationResult.grade"
					value="oralExaminationResult.grade" theme="simple" /></td>
			<td><s:textfield theme="simple"
					name="oralExaminationResult.date" /></td>
			<td><s:textfield theme="simple"
					name="oralExaminationResult.typist" /></td>
		</s:else>
	</table>

	<%-- Add button --%>
	<table class="formTable">
		<tr>
			<td><s:if test="openExam">
					<s:submit theme="simple" key="button.add" action="AddOralExam" />
				</s:if></td>
		</tr>
		<%-- Save button --%>
		<s:if test="!openExam">
			<tr>
				<td><s:submit theme="simple" key="button.save"
						action="SaveOralExam" /> <s:submit theme="simple"
						key="button.cancel" action="ShowOralExamOverview" /></td>
			</tr>
		</s:if>
	</table>

</s:form>

